package com.nix.web.databases.mapper.user;

import com.nix.web.databases.CurdFactory;
import com.nix.web.databases.pojo.user.Permissions;
import com.nix.web.databases.pojo.user.Resources;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author zhangpei
 * @Email zhangpe0312@qq.com
 * @day 2017/11/2 13:22
 * @Use
 */
@Repository
public interface ResourcesMapper extends CurdFactory<Resources> {
    /**
     * 批量添加资源
     *
     * @param resourcesList
     */
    void addList(@Param("resourcesList") List<Resources> resourcesList);

    /**
     * 通过权限ID获取他的资源
     *
     * @param pid
     * @param available 0---冻结的资源 1---正常使用的资源
     * @return
     */
    List<Permissions> getResourcesAllByPermissionID(@Param("pid") Integer pid, @Param("available") Integer available);


}